package com.ms.teapuesto.util;


import java.util.Comparator;

/**
 * Created by IntelliJ IDEA.
 * User: jmorales
 * Date: 17/08/12
 * Time: 12:15 PM
 */
public class IntComparable implements Comparator {

    @Override
    public int compare(Object object1, Object object2) {
        ObjetoCabecera f1 = (ObjetoCabecera)object1;
        ObjetoCabecera f2 = (ObjetoCabecera)object2;
        Integer o1 = f1.getPosition();
        Integer o2 = f2.getPosition();
        return (o1 < o2 ? -1 : (o1 == o2 ? 0 : 1));
    }

}
